#pragma once
#include "LumineTexture.hpp"

namespace Lumine
{
    /// @brief 深度贴图
    class DepthTexture : public LumineTexture
    {
    private:
        vk::Extent2D m_extent;
        vk::Format findDepthFormat();
        vk::Format findSupportedFormat(const std::vector<vk::Format> &candidates, vk::ImageTiling tiling, vk::FormatFeatureFlags features);
        bool hasStencilComponent(vk::Format format);

        void createTextureImage() override;
        void createTextureImageView();

    public:
        DepthTexture() = default;
        void SetExtent(vk::Extent2D extent) { m_extent = extent; }
        void Create() override;
    };
}